package com.abou.aop.logs;

import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.core.Ordered;

/**
 * The interface of the aspect enabling to log a method name and its inputs when
 * entering a method, and to log a method name and the returned value when
 * returning from the method.
 * 
 * @author khalid
 */
public interface LogAspect extends Ordered {
  
  /**
   * Executed before and after executing a method.
   * 
   * @param pjp The join point.
   * @return The value returned by the called method.
   * @throws Throwable Any error or exception thrown by the called method.
   */
  Object log(ProceedingJoinPoint pjp) throws Throwable;
}
